package com.ustudy.entity.ec;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.ustudy.core.dao.support.entity.LongIdEntity;

import com.ustudy.entity.commons.PathFile;

/**
 * 商品照片
 * @author caizh
 *
 */
@SuppressWarnings("serial")
@Entity(name="GoodsPhoto")
@Table(name="EC_GOODS_PHOTO")
public class GoodsPhoto extends LongIdEntity {
	
	@ManyToOne(cascade={CascadeType.REFRESH},fetch=FetchType.LAZY)
	@JoinColumn(name="GOODS_ID")
	private Goods goods;
	
	@ManyToOne(cascade={CascadeType.REFRESH},fetch=FetchType.LAZY)
	@JoinColumn(name="IMG_ID")
	private PathFile image;
	
	private Long sortInfo=System.currentTimeMillis();
	
	private Boolean head=false;

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public PathFile getImage() {
		return image;
	}

	public void setImage(PathFile image) {
		this.image = image;
	}

	public Long getSortInfo() {
		return sortInfo;
	}

	public void setSortInfo(Long sortInfo) {
		this.sortInfo = sortInfo;
	}

	public Boolean getHead() {
		return head;
	}

	public void setHead(Boolean head) {
		this.head = head;
	}
	
	
}
